package com.jerome.fs.server.aggregation;

import com.jerome.fs.entities.WeatherVo;
import com.jerome.fs.http.Request;
import com.jerome.fs.lamport.LamportClock;

import java.net.Socket;

/**
 * message queue data Event
 * Inheriting LamportClock has implemented sequential consumption in lamport clock order.
 * @author Jerome
 * @date 2023/9/7
 */
public class ServerMqEvent extends LamportClock {
    private Socket socket;
    private Request request;
    private String id;
    private WeatherVo weatherVo;

    public ServerMqEvent(int latestTime) {
        super(latestTime);
    }

    public ServerMqEvent(int latestTime, Socket socket, Request request, String id, WeatherVo weatherVo) {
        super(latestTime);
        this.socket = socket;
        this.request = request;
        this.id = id;
        this.weatherVo = weatherVo;
    }

    public Socket getSocket() {
        return socket;
    }

    public void setSocket(Socket socket) {
        this.socket = socket;
    }

    public Request getRequest() {
        return request;
    }

    public void setRequest(Request request) {
        this.request = request;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public WeatherVo getWeatherVo() {
        return weatherVo;
    }

    public void setWeatherVo(WeatherVo weatherVo) {
        this.weatherVo = weatherVo;
    }
}
